<!-- src/routes/+layout.svelte -->
<script lang="ts">
  import { isSigned$ } from "@entity/User";
  import { routeTo } from "@service/navigate";
  import { browser } from "$app/environment";
  import SideMenu from "./SideMenu.svelte";
  $: {
    if (!$isSigned$) {
      console.log('$isSigned$=>', $isSigned$)
      console.log('browser=>',browser)
      browser && routeTo("/signin");
    }
  }
</script>

<main class="flex flex-row items-center w-full h-full">
  <SideMenu />
  <main class="flex-1 h-full">
    <slot />
  </main>
</main>